package com.gongzhiyun.springboot3test.mapper.message;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gongzhiyun.springboot3test.entity.message.TbReplyMessages;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface TbReplyMessagesMapper extends BaseMapper<TbReplyMessages> {
    //增加，减少praise
    @Update("update tb_reply_messages set praise=praise+1 where id=#{mrid}")
    int addPraise(Integer mrid);

    @Update("update tb_reply_messages set praise=praise-1 where id=#{mrid}")
    int DecPraise(Integer mrid);
}
